package zust.javaee.enums.Member;

/**
 * Created by liy on 2017/1/8.
 */
public enum MemberLevelEnum {

    QUIT((short)-2,"被停用"),
    DEMERITMANY((short)-1,"多次记过"),
    DEMERIT((short)0,"记过"),
    STAR1((short)1,"1星级"),
    STAR2((short)2,"2星级"),
    STAR3((short)3,"3星级"),
    STAR4((short)4,"4星级"),
    STAR5((short)5,"5星级");

    private Short status;

    private String info;


    public static MemberLevelEnum stateOf(int index) {
        for (MemberLevelEnum e : values()) {
            if (e.getStatus() == index) {
                return e;
            }
        }
        return null;
    }


    private MemberLevelEnum(Short status, String info) {
        this.status = status;
        this.info = info;
    }

    public Short getStatus() {
        return status;
    }

    public void setStatus(Short status) {
        this.status = status;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }


}
